/* Import Google font 'Lato' for use throughout the convenio block */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

/* Import TT Ramillas font for headings */
@font-face{
    font-family: "TT Ramillas W03 Regular";
    src: url("../../fonts/311f6b683b69b2e481bec0dc7c27d412.eot");
    src: url("../../fonts/311f6b683b69b2e481bec0dc7c27d412.eot?#iefix")format("embedded-opentype"),
        url("../../fonts/311f6b683b69b2e481bec0dc7c27d412.woff")format("woff"),
        url("../../fonts/311f6b683b69b2e481bec0dc7c27d412.woff2")format("woff2"),
        url("../../fonts/311f6b683b69b2e481bec0dc7c27d412.ttf")format("truetype"),
        url("../../fonts/311f6b683b69b2e481bec0dc7c27d412.svg#TT Ramillas W03 Regular")format("svg");
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

/* Main Convenio Block Styles */
.segib20_convenio {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 0 30px 0;
    background-color: white;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section - Matching greetings styling, no lateral padding */
.segib20_convenio__header {
    padding: 60px 0 40px 0;
    text-align: left;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    box-sizing: border-box;
}

.segib20_convenio__title {
    font-family: "TT Ramillas W03 Regular", serif;
    font-size: 48px;
    line-height: 1;
    color: #000000 !important;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-align: left;
}

/* Blue Background Section */
.segib20_convenio__blue-section {
    background-color: #37BAD9; /* Blue color from Figma: rgb(55, 186, 217) */
    padding: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: left;
    min-height: 400px;
    overflow: hidden; /* Hide overflow to show only part of SVG */
}

/* Rotating SVG pseudo-element */
.segib20_convenio__blue-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 480px;
    height: 480px;
    background-image: url('./assets/convenio_graphic_bottom.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform-origin: center center;
    transform: translate(50%, 50%); /* Center on corner */
    animation: convenio-rotate 16s linear infinite; /* 16s = 4 rotations × 4s each */
    pointer-events: none;
}

/* Rotation animation - 90 degrees every 4 seconds, 1 second transition */
@keyframes convenio-rotate {
    0% { transform: translate(50%, 50%) rotate(0deg); }
    6.25% { transform: translate(50%, 50%) rotate(90deg); } /* 1s transition at 1/16 of 16s */
    25% { transform: translate(50%, 50%) rotate(90deg); } /* Hold for 3s */
    31.25% { transform: translate(50%, 50%) rotate(180deg); } /* 1s transition */
    50% { transform: translate(50%, 50%) rotate(180deg); } /* Hold for 3s */
    56.25% { transform: translate(50%, 50%) rotate(270deg); } /* 1s transition */
    75% { transform: translate(50%, 50%) rotate(270deg); } /* Hold for 3s */
    81.25% { transform: translate(50%, 50%) rotate(360deg); } /* 1s transition */
    100% { transform: translate(50%, 50%) rotate(360deg); } /* Hold for 3s */
}

/* Main Text Content inside Blue Section */
.segib20_convenio__intro {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #000000 !important;
    text-align: left;
    width: 100%;
    margin: 0 0 40px 0;
}

.segib20_convenio__intro p {
    margin: 0 0 20px 0;
}

.segib20_convenio__intro p:last-child {
    margin-bottom: 0;
}

/* Button Container */
.segib20_convenio__button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

/* Button Styles - White with black text */
.segib20_convenio__button {
    display: flex;
    align-items: center;
    background-color: white;
    color: #1B1C1F !important;
    padding: 7px 21px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    height: 42px;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    outline: none;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    transition: background-color 0.3s ease;
}

.segib20_convenio__button:hover,
.segib20_convenio__button:focus {
    background-color: #f8f8f8;
    text-decoration: none;
    color: #1B1C1F !important;
}

.segib20_convenio__button:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Responsive Design - Matching introbanner breakpoints */
@media (max-width: 991px) {
    .segib20_convenio {
        /* Force full width */
        width: 100vw;
        max-width: 100vw; /* Ensure no other rule overrides this */
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        /* Reset side margins/paddings if needed */
        margin-left: 0;
        margin-right: 0;
    }

    .segib20_convenio__title {
        font-size: 42px;
    }
    
    .segib20_convenio__blue-section {
        padding: 60px 40px;
        min-height: 350px;
    }
    
    .segib20_convenio__blue-section::after {
        width: 400px;
        height: 400px;
    }
    
    .segib20_convenio__intro {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .segib20_convenio__button-container {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .segib20_convenio__title {
        font-size: 28px;
        padding: 0 20px;
    }
    
    .segib20_convenio__blue-section {
        padding: 30px 20px;
        min-height: 250px;
    }
    
    .segib20_convenio__blue-section::after {
        width: 320px;
        height: 320px;
    }
    
    .segib20_convenio__intro {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .segib20_convenio__button-container {
        margin-top: 20px;
    }
}

/* Animation for scroll-triggered effects */
.segib20_convenio__header,
.segib20_convenio__blue-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.segib20_convenio__header.is-visible,
.segib20_convenio__blue-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.segib20_convenio__blue-section.is-visible {
    transition-delay: 0.2s;
}

