/* --- 1. CSS VARIABLES (Color Palette) --- */
:root {
    --primary-color: #0A2540; /* Deep corporate blue */
    --accent-color: #0077FF;  /* Bright action blue */
    --text-color: #333333;
    --bg-light: #F6F9FC;      /* Soft background gray */
    --white: #FFFFFF;
}

/* --- 2. GLOBAL RESET & TYPOGRAPHY --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Keeps the footer at the bottom */
}

/* A reusable container to keep content centered */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
}

/* --- 3. HEADER & NAVIGATION --- */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Soft shadow */
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem; /* Spacing between menu items */
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

/* --- 4. HERO SLIDER --- */
.hero-slider {
    width: 100%;
    background-color: var(--primary-color);
}

.hero-swiper {
    width: 100%;
    height: 500px; /* Fixed height for the slider */
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
}

/* Background gradients for slides (You can replace these with background images later!) */
.slide-bg-1 { background: linear-gradient(135deg, #0A2540 0%, #1a4b7c 100%); }
.slide-bg-2 { background: linear-gradient(135deg, #005ce6 0%, #003380 100%); }
.slide-bg-3 { background: linear-gradient(135deg, #1e3c5a 0%, #0A2540 100%); }
.slide-bg-4 { background: linear-gradient(135deg, #0f4c81 0%, #061c30 100%); }

.slide-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeIn 1s ease-in-out;
}

.slide-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Alternate Outline Button Style for Variety */
.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Swiper UI Customization */
.swiper-button-next, .swiper-button-prev {
    color: var(--white) !important;
    transform: scale(0.7);
}

.swiper-pagination-bullet {
    background: var(--white) !important;
    opacity: 0.5;
}
.swiper-pagination-bullet-active {
    opacity: 1;
}

/* Mobile Adjustments for Slider */
@media (max-width: 768px) {
    .hero-swiper {
        height: 400px;
    }
    .slide-content h1 {
        font-size: 2rem;
    }
    .slide-content p {
        font-size: 1rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- 5. BUTTONS --- */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #005ce6;
    transform: translateY(-2px);
    color: var(--white);
}

/* --- 6. FOOTER --- */
.main-footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* --- 7. APPLICATION FORM --- */
.application-section {
    padding: 3rem 0;
}

.form-container {
    max-width: 800px;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
}

.form-container h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 1rem;
}

.form-container p {
    margin-bottom: 2rem;
    color: #666;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: var(--bg-light);
}

legend {
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--white);
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

/* Flexbox grid for side-by-side inputs */
.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1; /* Makes the side-by-side inputs equal width */
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 119, 255, 0.1);
}

.submit-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* --- 8. ALERTS --- */
.alert {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    font-weight: 500;
}
.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- 9. ADMIN DASHBOARD & TABLES --- */
.admin-section {
    padding: 3rem 0;
}

.table-responsive {
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, 
.admin-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
}

.admin-table tr:hover {
    background-color: var(--bg-light);
}

/* Status Badges */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-pending { background-color: #ffeeba; color: #856404; }
.badge-approved { background-color: #d4edda; color: #155724; }
.badge-rejected { background-color: #f8d7da; color: #721c24; }

/* Action Buttons */
.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--white);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn-sm:hover { opacity: 0.8; color: white;}
.btn-approve { background-color: #28a745; }
.btn-reject { background-color: #dc3545; }

/* --- 10. MEMBERS DIRECTORY --- */
.members-section {
    padding: 4rem 0;
}

.directory-header {
    text-align: center;
    margin-bottom: 3rem;
}

.directory-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Filter Bar */
.filter-bar {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form input, .filter-form select {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-search {
    background-color: var(--primary-color);
}
.btn-clear {
    background-color: #6c757d;
}

/* Members Grid Layout */
.members-grid {
    display: grid;
    /* This automatically creates responsive columns based on screen size */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Individual Member Cards */
.member-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-color);
    overflow: hidden;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background-color: #fafbfc;
}

.card-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.sector-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.card-body p {
    margin-bottom: 0.8rem;
    color: #555;
}

.card-body a {
    color: var(--accent-color);
}

.card-body .address {
    font-size: 0.9rem;
    color: #777;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #eee;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    text-align: center;
}

.website-link {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.website-link:hover {
    text-decoration: underline;
}

.no-website {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-style: italic;
}

/* --- 10. PAGES & MEDIA GALLERY --- */
.page-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Video Wrapper */
.video-container {
    max-width: 900px; /* Prevents the video from becoming overwhelmingly huge on large monitors */
    margin: 0 auto;   /* Centers it */
    border-radius: 8px;
    overflow: hidden; /* Clips the sharp corners of the video to match the border radius */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background-color: #000; /* Black background while loading */
}

.video-container video {
    width: 100%;
    height: auto;     /* Keeps the aspect ratio perfect */
    display: block;   /* Removes the weird 3px gap below inline elements */
}

/* --- 11. HEADER LOGO SIZING & STYLING --- */
.header-logo-img {
    width: 60px;  /* Force a perfect square */
    height: 60px;
    object-fit: cover; /* Ensures the image fills the circle cleanly */
    border-radius: 50%; /* Circle-ifies the image */
    
    /* Adds a subtle gray border and a soft drop shadow */
    border: 2px solid #eaeaea; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.header-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .header-logo-img {
        width: 45px;
        height: 45px;
    }
    
    /* Hide the AGTD text on mobile to save space */
    .header-logo-text {
        display: none;
    }
}

/* --- 12. ANLAŞMALI FİRMALAR (PARTNERS) --- */
.partners-grid {
    display: grid;
    /* Automatically creates responsive columns. Will show 1 on phones, 3-4 on large screens */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.partner-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeaea;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* The upper box specifically for the logo */
.partner-logo-box {
    height: 180px;
    background-color: #f8f9fa; /* Very light gray */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eaeaea;
    padding: 2rem;
}

/* Ensures logos never stretch weirdly and fit perfectly inside the box */
.partner-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    color: #adb5bd;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The lower box for the text */
.partner-info {
    padding: 2rem;
    text-align: center;
    flex-grow: 1; /* Pushes the link to the bottom */
    display: flex;
    flex-direction: column;
}

.partner-info h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

/* Highlights the specific deal/discount */
.partner-discount {
    background-color: #e8f5e9; /* Very light green */
    color: #2e7d32;            /* Dark green text */
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    align-self: center;        /* Keeps it centered */
    margin-bottom: 1rem;
}

.partner-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.partner-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.partner-link:hover {
    text-decoration: underline;
}

/* --- 13. HAKKIMIZDA (ABOUT US) --- */
.about-section {
    padding: 4rem 0;
}

/* Intro Section (Text Left, Image Right) */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

.image-placeholder {
    width: 100%;
    height: 350px;
    background-color: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Mission & Vision Grid */
.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 5rem;
}

.mv-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent-color);
}

.mv-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.mv-card p {
    color: #666;
    line-height: 1.6;
}

/* Board of Directors Grid */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.board-member {
    text-align: center;
}

.member-photo-placeholder {
    width: 150px;
    height: 150px;
    background-color: #e9ecef;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border: 3px solid var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.board-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.board-member h4 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}

.board-member span {
    color: #777;
    font-size: 0.9rem;
}

/* --- 14. RESPONSIVE MOBILE MENU --- */

/* Hide the hamburger button on desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 101; /* Keeps it above the dropdown */
}

/* Style the 3 lines */
.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Show the hamburger button */
    .menu-toggle {
        display: flex;
    }

    /* Convert the navigation into a dropdown */
    #nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        display: none; /* Hidden by default on mobile */
    }

    /* Stack the links vertically */
    #nav-menu ul {
        flex-direction: column;
        gap: 0;
    }

    #nav-menu ul li {
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    #nav-menu ul li a {
        display: block;
        padding: 1.2rem;
    }

    /* This class is added by JavaScript when the hamburger is clicked */
    #nav-menu.active {
        display: block;
    }

    /* Cool Animation: Turns the 3 lines into an "X" when open */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* --- MOBILE FORM FIXES --- */
    
    /* 1. Reduce the massive desktop padding so the form fits the screen */
    .form-container {
        padding: 1.5rem;
        margin-top: 1rem;
    }

    /* 2. Stack the side-by-side inputs vertically */
    .form-row {
        flex-direction: column;
        gap: 0; /* Remove the horizontal gap since they are stacked now */
    }

    /* 3. Reduce fieldset padding to give textboxes more breathing room */
    fieldset {
        padding: 1rem;
    }

    /* 4. Ensure inputs and textareas don't overflow the screen bounds */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    textarea,
    input[type="file"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box; /* Forces padding to stay inside the width */
    }
    
    /* --- MOBILE SLIDER FIXES --- */
    .hero-swiper {
        height: 420px; /* Shrinks the overall height so it fits on screens better */
    }
    
    .slide-content {
        padding: 0 1.5rem;
    }
    
    .slide-content h1 {
        font-size: 2rem; /* Significantly scales down the massive title */
        margin-bottom: 0.8rem;
    }
    
    .slide-content p {
        font-size: 1rem; /* Scales down the paragraph */
        margin-bottom: 1.5rem;
    }
    
    /* UX Hack: Hide the left/right arrows on mobile. 
       Users naturally swipe on touch screens, and arrows just clutter the small screen! */
    .swiper-button-next, 
    .swiper-button-prev {
        display: none !important;
    }
    
    /* --- MOBILE ABOUT US FIXES --- */
    .about-intro {
        grid-template-columns: 1fr; /* Stacks text and image */
        gap: 2rem;
    }
    
    .mission-vision-grid {
        grid-template-columns: 1fr; /* Stacks Mission and Vision */
    }

    .mv-card {
        padding: 2rem; /* Reduces padding slightly for small screens */
    }
}