:root {
    --primary: #1a237e;
    /* Deeper blue */
    --secondary: #3f51b5;
    /* Rich indigo */
    --accent: #ff4081;
    /* Vibrant pink */
    --light: #f5f5f5;
    /* Lighter gray */

    /* Add new color variables */
    --gradient-start: #1a237e;
    --gradient-end: #3f51b5;
    --text-primary: #2c3e50;
    --card-shadow: rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Logo */
.header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 1rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.logo svg {
    width: 40px;
    height: 40px;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Navigation */
.nav {
    background: var(--light);
    padding: 1rem;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1rem;
    justify-content: center;
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
    padding: 0.5rem 0;
    list-style: none; /* Add this line to remove dots */
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.nav-link {
    color: var(--primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--secondary);
    color: white;
}

.dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-link:hover {
    background: var(--secondary);
    color: white;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Main Content */
.main {
    flex: 1; /* Allow main content to grow and push footer down */
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--card-shadow);
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.current-time {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

/* Calendar */
.calendar {
    width: 100%;
    border-collapse: collapse;
}

.calendar th,
.calendar td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #ddd;
}

.calendar td.today {
    background: var(--secondary);
    color: white;
    font-weight: bold;
    border-radius: 50%;
}

.calendar td.selected {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.calendar td:hover {
    background: var(--light);
    cursor: pointer;
    transform: scale(1.1);
    transition: all 0.2s;
}

/* Weather */
.weather {
    text-align: center;
}

.weather-icon {
    width: 100px;
    height: 100px;
    margin: 1rem auto;
}

.temperature {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary);
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.weather-details::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
}

.weather-details:hover::after {
    animation: shine 1.5s infinite;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

/* Holiday List Enhancement */
#holidays li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

#holidays li:hover {
    transform: translateX(10px);
}

.holiday-date {
    background: var(--secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Homepage Image Card */
.homepage-image-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.homepage-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.homepage-image:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto; /* Push footer to the bottom */
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Dark Mode Styles */
body.dark-mode {
    background: #121212;
    color: #fafafa;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.faq-item {
    background: var(--light);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateX(10px);
}

.faq-item summary {
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary);
}

.faq-item[open] summary {
    margin-bottom: 1rem;
    color: var(--accent);
}

.faq-item p {
    padding: 0 1rem;
    line-height: 1.6;
}

/* Dark mode support */
body.dark-mode .faq-item {
    background: #2a2a2a;
}

body.dark-mode .faq-item summary {
    color: #ffffff;
}

body.dark-mode .card {
    background: #1e1e1e;
    color: #fafafa;
}

body.dark-mode .nav {
    background: #1e1e1e;
}

body.dark-mode .nav-link {
    color: #ffffff;
}

body.dark-mode .weather-details {
    background: #2a2a2a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch; /* Ensure items stretch to full width */
    }

    .logo {
        flex-direction: row;
        justify-content: space-between; /* Distribute space evenly */
        align-items: center;
        padding: 0.5rem;
    }

    .logo h1 {
        text-align: left; /* Align title to the left */
    }

    .menu-toggle {
        display: block;
    }

    .nav {
        padding: 0; /* Reduce padding */
    }

    .nav-list {
        display: none;
        flex-direction: column;
        text-align: center; /* Center menu items */
        width: 100%; /* Occupy full width */
    }

    .nav-list.active {
        display: flex;
    }

    .nav-item {
        width: 100%; /* Each item occupies full width */
    }

    .nav-link {
        padding: 0.75rem;
        border-bottom: 1px solid #ddd; /* Add a separator */
        display: block; /* Make links fill the container */
    }

    .nav-link:hover {
        background: var(--secondary);
        color: white;
    }

    .dropdown-menu {
        position: static; /* Make dropdown full width and not absolute */
        box-shadow: none;
        background: none;
        border-radius: 0;
        padding: 0;
        min-width: unset;
    }

    .dropdown-link {
        padding-left: 2rem; /* Indent dropdown items */
        border-bottom: 1px solid #eee; /* Add separator for dropdown items */
    }

    .main {
        padding: 1rem;
        grid-template-columns: 1fr; /* Stack cards */
        gap: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .current-time {
        font-size: 1.5rem;
    }

    .calendar th,
    .calendar td {
        padding: 0.3rem;
    }

    .faq-container {
        margin-top: 0.5rem;
    }

    .faq-item {
        padding: 0.75rem;
    }

    .calculator-container {
        padding: 1rem;
    }
}

/* Small screens */
@media (max-width: 576px) {
    .logo h1 {
        font-size: 1.5rem; /* Smaller title for smaller screens */
    }

    .dark-mode-toggle {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem;
    }

    .footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

.calculator-container {
    padding: 2rem;
}

.date-inputs {
    display: grid;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: bold;
    color: var(--primary);
}

.input-group input {
    padding: 0.8rem;
    border: 2px solid var(--secondary);
    border-radius: 4px;
    font-size: 1rem;
}

.calc-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.calc-button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.result-display {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 4px;
    text-align: center;
    font-size: 1.2rem;
}

.feature-list {
    list-style: none;
    padding: 1rem;
}

.feature-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 0; /* Changed from 1.5rem to 0 */
}

.feature-list li::before {
    content: ""; /* Changed from "•" to "" to remove dots */
    color: var(--secondary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

@keyframes cardBackground {
    0% {
        background: linear-gradient(45deg, #f6f8ff, #ffffff);
    }

    50% {
        background: linear-gradient(45deg, #e0e6ff, #f8faff);
    }

    100% {
        background: linear-gradient(45deg, #d4deff, #ffffff);
    }
}

/* Facebook Like Button (basic styling) */
.fb-like {
    margin: 20px auto; /* Center the button horizontally */
    text-align: center; /* Ensure the content is centered */
    display: block; /* Make it a block-level element */
}

/* Specific styling for the date pages */
.current-date-display {
    font-size: 2rem;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

/* Annual Calendar Specific Styles */
.annual-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.month-calendar-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.month-calendar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.month-calendar-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.month-calendar-card .calendar {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.month-calendar-card .calendar th,
.month-calendar-card .calendar td {
    padding: 0.4rem;
    border: 1px solid #eee;
}

.month-calendar-card .calendar th {
    background-color: var(--light);
    color: var(--secondary);
    font-weight: bold;
}

body.dark-mode .month-calendar-card {
    background: #1e1e1e;
    color: #fafafa;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.08);
}

body.dark-mode .month-calendar-card h3 {
    color: #fafafa;
}

body.dark-mode .month-calendar-card .calendar th {
    background-color: #2a2a2a;
    color: #ffffff;
}

body.dark-mode .month-calendar-card .calendar td {
    border: 1px solid #3a3a3a;
}

.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.calendar-controls .calc-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.holiday {
    background-color: #ffcccc !important; /* Light red for holidays */
    color: #cc0000 !important; /* Darker red text */
    font-weight: bold;
}

body.dark-mode .holiday {
    background-color: #570000 !important;
    color: #ff9999 !important;
}

.holiday-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.holiday-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light);
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .holiday-item {
    background: #2a2a2a;
    border-left-color: var(--accent);
}

.holiday-item strong {
    color: var(--primary);
    font-size: 1.1rem;
}

body.dark-mode .holiday-item strong {
    color: #fafafa;
}

.holiday-item span.date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

body.dark-mode .holiday-item span.date {
    color: #bbb;
}

.holiday-item p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-primary);
}

body.dark-mode .holiday-item p {
    color: #ccc;
}