/* ======= VARIABLES ======= */
:root {
    --primary: #2454a9;      /* Darkened primary blue for better contrast */
    --primary-light: #3182ce;
    --secondary: #5a6779;    /* Darkened secondary gray for better contrast */
    --accent: #2471cb;       /* Darkened accent blue for better contrast */
    --light: #f7fafc;        /* Light background */
    --dark: #2d3748;         /* Dark text color */
    --success: #2e8555;      /* Darkened success green for better contrast */
    --danger: #d32f2f;       /* Darkened danger red for better contrast */
    --warning: #f59f00;      /* Darkened warning yellow for better contrast */
    
    /* Theme variables */
    --background: #f7fafc;
    --text-color: #2d3748;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --border-color: #edf2f7;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --testimonial-bg: #ffffff;
    --footer-bg: #2d3748;
    --footer-text: #ffffff;
    --footer-link: #cbd5e0;  /* Lightened for better contrast */
    --input-bg: #ffffff;
    --input-text: #2d3748;
    --input-border: #a0aec0;  /* Darkened for better visibility */
    --hover-bg: #f7fafc;
    --services-bg: #f8fafc;
    --contact-bg: #f8fafc;
    --error-color: #d32f2f;
    --focus-outline: #2454a9;
    --focus-outline-width: 3px;
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary: #63b3ed;      /* Lightened primary for dark mode */
    --primary-light: #90cdf4;
    --secondary: #cbd5e0;    /* Lightened secondary for dark mode */
    --background: #1a202c;
    --text-color: #f7fafc;
    --card-bg: #2d3748;
    --header-bg: #1a202c;
    --border-color: #4a5568;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --testimonial-bg: #2d3748;
    --footer-bg: #171923;
    --footer-text: #f7fafc;
    --footer-link: #e2e8f0; /* Lightened for better contrast */
    --input-bg: #2d3748;
    --input-text: #f7fafc;
    --input-border: #718096; /* Lightened for better visibility */
    --hover-bg: #2d3748;
    --services-bg: #171923;
    --contact-bg: #171923;
    --error-color: #f56565;
    --focus-outline: #90cdf4;
}

/* ======= GLOBAL STYLES ======= */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.displayed-but-hidden {
    opacity: 0;
    pointer-events: none;
}

.displayed-but-hidden.fade-in {
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    pointer-events: all;
}

.clickable {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 2px 2px 15px var(--shadow-color);
}
.clickable:hover {
    color: var(--input-bg);
    background-color: var(--secondary);
    transition: all 0.5s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
    width: 100%;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ======= NAVIGATION ======= */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 97%;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    align-items: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--primary);
}

/* ======= OPTIONS SECTION ======= */
.whitelisting {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--background) 0%, var(--card-bg) 100%);
    text-align: center;
    width: 100%;
    transition: background 0.3s ease;
}

.whitelisting.condensed {
    padding: 2rem 0;
}

.whitelisting h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.whitelisting p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--secondary);
}

.whitelisting-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

.whitelisting-content-box {
    background-color: var(--input-bg);
    padding: 2rem 0px;
    border: solid 1px var(--primary-light);
    border-radius: 15px;
}

.whitelisting-list-title {
    margin-bottom: 1rem;
}

.whitelisting-list-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 700px;
}

.whitelisting-list-box ol {
    text-align: left;
}

.whitelisting-list-box ol li {
    list-style-position: outside;
    margin-left: 0.5rem;
}

.whitelisting-list-box ol ol {
    margin-left: 1rem;
}

.whitelisting-list-box ol ul {
    margin-left: 1rem;
}

.whitelisting-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.domains-ips-title {
    text-align: center;
    padding-bottom: 10px;
}

.whitelisting-grid {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 20px 10px;
    align-items: center;
    justify-content: center;
}

.whitelisting-grid div {
    min-width: 250px;
}

.whitelisting-active {
    color: var(--success);
}

.whitelisting-inactive {
    color: var(--error-color);
}

.whitelisting-options {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0px;
    background-color: var(--input-bg);
    border: solid 1px var(--primary-light);
    border-radius: 15px;
}

.whitelisting-walkthroughs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.walkthrough-options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.2rem 1rem;
    flex-wrap: wrap;
}

.meta-options {
    display: flex;
    justify-content: center;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    width: 80%;
}

.meta-options.not-alone {
    border-top: solid 1px var(--primary-light);
    padding-top: 1rem;
}

.whitelisting-button {
    margin: 10px 5px;
    padding: 10px 20px;
    border: 1px solid var(--text-color);
    border-radius: 15px;
    cursor: pointer;
    width: 200px;
}

.whitelisting-button:hover {
    color: var(--text-color);
    background-color: var(--primary);
    transition: all 0.5s ease-in-out;
}

#back-button {
    width: auto !important;
}

#home-button {
    width: auto !important;
}

/* ======= Theme Toggle Button ======= */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: right;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s;
    padding: 0;
    position: relative;
    margin-left: auto;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: opacity 0.3s, transform 0.5s;
}

.sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.moon-icon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

/* ======= RESPONSIVE STYLES ======= */
/* Larger screens (993px and above) */
@media (min-width: 993px) {    
    .whitelisting-content {
        min-width: 800px;
    }

    .whitelisting-options {
        min-width: 800px;
    }
}

/* Large screens (992px and below) */
@media (max-width: 992px) {    
    .feature {
        max-width: 280px;
        flex: 1 1 280px;
    }
}

/* Medium screens (768px and below) */
@media (max-width: 768px) {
    /* Header adjustments */
    .nav-container {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem;
    }

    /* Content adjustments */
    .whitelisting {
        padding: 2rem 0;
    }

    .whitelisting-grid {
        grid-template-columns: repeat(1, auto);
    }

    .whitelisting-list-box {
        max-width: 475px;
    }
    
    /* Theme toggle placement for mobile */
    .theme-toggle {
        margin-right: 1rem;
    }
}

/* Small screens (576px and below) */
@media (max-width: 576px) {
    /* Improve mobile table readability */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .whitelisting {
        padding: 2rem 0;
    }

    .whitelisting-list-box {
        max-width: 300px;
        font-size: small;
        -webkit-overflow-scrolling: touch;
    }

    .whitelisting-list-box ol {
        max-width: 275px;
        -webkit-overflow-scrolling: touch;
    }

    .long-string {
        font-size: 8px;
    }
}
